The present invention relates to an image processing apparatus and image processing method and, more particularly, to image processing of converting data of each pixel into data of a smaller number of gray levels than the number of input gray levels in a printing apparatus which performs printing by moving a printhead having a plurality of printing elements arrayed in a predetermined direction, relatively to a printing medium.
As an information output apparatus for a wordprocessor, personal computer, facsimile apparatus, or the like, a printing apparatus which prints information such as a desired character or image on a sheet-like printing medium such as a paper sheet or film may use various methods. Of these methods, a method of applying a printing agent to a printing medium to form text or an image on the printing medium is put into practical use. A typical example of this type is an ink-jet printing apparatus. Recently, ink-jet printing apparatuses are attaining higher performance, and can print not only text but also images.
For higher printing speeds and higher image quality, the ink-jet printing apparatus uses a nozzle group constructed by packing and arraying a plurality of ink orifices (nozzles) capable of discharging ink of the same color at the same density. Such nozzle groups are generally arranged for ink of the same color at different densities or inks of different colors. Some apparatuses can discharge ink by changing stepwise the discharge amount of ink of the same color at the same density.
The printhead having these nozzle groups is moved relative to a printing medium, and discharges ink from the nozzles to print.
To print an image, a halftone processing method such as dithering or error diffusion is employed as a method of exactly reproducing the tone of image information. For example, an error diffusion method by R. Floyd (xe2x80x9cAn adaptive algorithm for spatial gray scalexe2x80x9d, SID International Symposium Digest of Technical Papers, vol. 4.3, 1975, pp. 36-37) is known as a method of converting multilevel image data into a binary image (or an image having the number of binary or higher gray levels which is smaller than the number of input gray levels). According to this error diffusion method, a binary error in a given pixel is diffused to subsequent pixels to realize a pseudo tone expression.
Error diffusion is widely adopted as a pseudo halftone processing method with high tone reproducibility in image processing apparatuses such as a printer, copying machine, and facsimile apparatus.
However, printing using error diffusion suffers from the following problem.
This problem will be described by exemplifying printing of an image by a serial printer such as an ink-jet printer in which a printhead having a plurality of nozzles arrayed in a predetermined direction scans a printing medium in a direction crossing to the nozzle array direction, and ink is discharged onto the printing medium to form an image.
A plurality of nozzles which discharge ink droplets (dots) include an (undischargeable) nozzle which cannot discharge dots under some influence, or a nozzle whose discharge dot volume does not reach a specified value. When using a large number of nozzles for a long nozzle array, there is a high probability of such abnormal nozzles being present.
FIG. 6 is a view showing a process of forming an image by one scanning operation of one image array (raster) using one nozzle array. Reference numeral 60 denotes a nozzle in a good discharge state; 61, an unprintable nozzle which cannot discharge dots; 62, a binarization result by an error diffusion method; and 63, a dot printing state.
When an image is formed by one scanning operation, no dot can be printed on a printing medium in a raster corresponding to an unprintable nozzle, as shown in FIG. 6. If dots must be formed in the raster corresponding to the unprintable nozzle by binarization processing complying with a conventional error diffusion method, an image around the dots is formed from dots smaller in number than dots which should be actually printed. In other words, density conservation as one of advantages of error diffusion cannot be fully achieved, greatly degrading the printing image quality.
It is an object of the present invention to provide an image processing apparatus capable of printing a high-quality image even when printing using a printhead having a printing element which cannot print normally.
It is another object of the present invention to provide an image processing method capable of printing a high-quality image even when printing using a printhead having a printing element which cannot print normally.
According to the first aspect of the present invention, the above object is attained by an image processing apparatus for a printing apparatus which performs printing by moving a printhead having a plurality of printing elements arrayed in a predetermined direction, relatively to a printing medium, comprising: determining means for determining whether input pixel data is pixel data to be printed by a printing element which cannot print normally; quantizing means for converting input multilevel data of each pixel into data of a smaller number of gray levels than the number of input gray levels; and error diffusing means for diffusing a difference between input data and data quantized by said quantizing means for a pixel of interest to pixels around the pixel of interest, wherein the quantizing means performs, for the pixel data determined by the determining means to be printed by the printing element which cannot print normally, quantization processing different from quantization processing for other pixel data.
According to the first aspect of the present invention, another object is attained by an image processing method for a printing apparatus which performs printing by moving a printhead having a plurality of printing elements arrayed in a predetermined direction, relatively to a printing medium, comprising: the determining step of determining whether input pixel data is pixel data to be printed by a printing element which cannot print normally; the quantizing step of converting input multilevel data of each pixel into data of a smaller number of gray levels than the number of input gray levels; and the error diffusing step of diffusing a difference between input data and data quantized in the quantizing step for a pixel of interest to pixels around the pixel of interest, wherein in the quantizing step, the pixel data determined in the determining step to be printed by the printing element which cannot print normally undergoes quantization processing different from quantization processing for other pixel data.
The above objects are also attained by a computer program which causes a computer to execute the image processing method, and a storage medium which stores the program.
More specifically, according to the first aspect of the present invention, in a printing apparatus which performs printing by moving a printhead having a plurality of printing elements arrayed in a predetermined direction, relatively to a printing medium, whether input pixel data is pixel data to be printed by a printing element which cannot print normally is determined. Input multilevel data of each pixel is converted into data of a smaller number of gray levels than the number of input gray levels. The difference between input data and quantized data of a pixel of interest is diffused to pixels around the pixel of interest. In quantization, the pixel data determined to be printed by the printing element which cannot print normally undergoes quantization processing different from that for other pixel data.
The pixel data determined to be printed by the printing element which cannot print normally undergoes processing different from that for other pixel data, e.g., processing of adding the data to an error applied to neighboring pixels. As a result, the pixel data can be diffused to neighboring pixels.
Even in printing using a printhead with a printing element which cannot print normally, the total of pixel data around the pixel of interest is equal to input data. A high-quality image maintaining information included in an input image can be printed.
Preferably, the quantizing means converts the pixel data determined by the determining means to be printed by the printing element which cannot print normally into data representing non-printing.
Preferably, the apparatus further comprises filter means for performing a predetermined filter process for input pixel data before input to said quantizing means.
In this case, the apparatus may further comprise a user interface for allowing a user to select the predetermined filter process from a plurality of filter processes.
Preferably, the filter means performs the predetermined filter process for pixels around the pixel determined to be subjected to printing by the printing element which cannot print normally.
The plurality of filter processes may be different in at least one of a range for performing the predetermined filter process and a filter characteristic.
The apparatus may further comprises filter storage means for storing parameters of the plurality of filter processes.
Preferably, the apparatus further comprises detecting means for detecting the printing element which cannot print normally.
The detecting means may detect the printing element which cannot print normally on the basis of a driving result of each printing element or on the basis of a printing result on a printing medium by each printing element.
According to the second aspect of the present invention, the above object is attained by an image processing apparatus for a printing apparatus which performs printing by moving a printhead having a plurality of printing elements arrayed in a predetermined direction, relatively to a printing medium, comprising: determining means for determining whether input pixel data is data of a pixel to be printed by a printing element which cannot print normally; quantizing means for converting input multilevel data of each pixel into data of a smaller number of gray levels than the number of input gray levels; and error diffusing means for diffusing a difference between input data and data quantized by the quantizing means for a pixel of interest to pixels around the pixel of interest, wherein the quantizing means performs, for data of a pixel neighboring the pixel determined by the determining means to be subjected to printing by the printing element which cannot print normally, quantization processing different from quantization processing for other pixel data.
According to the second aspect of the present invention, another object is attained by an image processing method for a printing apparatus which performs printing by moving a printhead having a plurality of printing elements arrayed in a predetermined direction, relatively to a printing medium, comprising: the determining step of determining whether input pixel data is data of a pixel to be printed by a printing element which cannot print normally; the quantizing step of converting input multilevel data of each pixel into data of a smaller number of gray levels than the number of input gray levels; and the error diffusing step of diffusing a difference between input data and data quantized in the quantizing step for a pixel of interest to pixels around the pixel of interest, wherein in the quantizing step, data of a pixel neighboring the pixel determined in the determining step to be subjected to printing by the printing element which cannot print normally undergoes quantization processing different from quantization processing for other pixel data.
The above objects are also achieved by a computer program which causes a computer to execute the image processing method, and a storage medium which stores the program.
More specifically, according to the second aspect of the present invention, in a printing apparatus which performs printing by moving a printhead having a plurality of printing elements arrayed in a predetermined direction, relative to a printing medium, whether input pixel data is data of a pixel to be printed by a printing element which cannot print normally is determined. Input multilevel data of each pixel is converted into data of a smaller number of gray levels than the number of input gray levels. The difference between input data and quantized data of a pixel of interest is diffused to pixels around the pixel of interest. In quantization, data of a pixel neighboring the pixel determined to be printed by the printing element which cannot print normally undergoes quantization processing different from that for other pixel data.
Pixel data neighboring unprintable pixel data determined to be printed by the printing element which cannot print normally undergoes processing different from that for other pixel data, e.g., processing of increasing the number of dots to be printed. This can relax an abrupt decrease in density caused by the unprintable pixel data.
Even when printing using a printhead with a printing element which cannot print normally, an abrupt decrease in density by the unprintable pixel data can be relaxed. A high-quality image almost free from blank stripes can be printed.
Preferably, the quantizing means comprises threshold varying means for varying a quantization threshold for data of the neighboring pixel.
The threshold varying means may vary the threshold so as to increase the number of printing dots to the neighboring pixel.
Preferably, the apparatus further comprises a user interface for allowing a user to select a parameter used by said threshold varying means.
The parameter may include an applicable range of threshold varying processing, a threshold varying strength, and whether to refer to an input pixel value in threshold setting.
The threshold varying means may define a threshold varying amount by referring to input pixel data.
Preferably, the apparatus further comprises detecting means for detecting the printing element which cannot print normally.
The detecting means detects the printing element which cannot print normally, on the basis of a driving result of each printing element, or on the basis of a printing result on a printing medium by each printing element.
Other features and advantages of the present invention will be apparent from the following description taken in conjunction with the accompanying drawings, in which like reference characters designate the same or similar parts throughout the figures thereof.